from matplotlib import pyplot as plt
import numpy as np

# 生成数据
n = 12
x = np.arange(n)
y1 = (1 - x / float(n)) * np.random.uniform(0.5, 1.0, n)
y2 = (1 - x / float(n)) * np.random.uniform(0.5, 1.0, n)

# 画图
plt.bar(x, +y1)
plt.bar(x, -y2)

plt.show()
